import random
player = 5000


while player > 0:
    a = random.randint(1, 100)
    b = int(input("请输入一个整数"))
    if a > b:
        print("小了")
        player -= 500
    elif a < b:
        print("大了")
        player -= 500
    else:
        print("恭喜猜中，本轮幸运数字：",a)
        player += 3000
        c = input("是否进行下一轮游戏,请输入yes或no")
        if c == "yes":
            continue
        elif c == "no":
            break


print("游戏结束")



